using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UpgradeGrenadeLauncher:Upgrade {
	public override void Update(object sender,WeaponEventArgs e) {
		base.Update(sender,e);
		weaponWeapon.altFireType=typeof(AltFireGrenadeLauncher);
	}
}

public class AltFireGrenadeLauncher:AltFireShoot {
	float timeLastLaunch;

	protected override void Weapon_Shooting(object sender,ShootEventArgs e) {
		base.Weapon_Shooting(sender,e);
		if(e.stat.shotTag!="altFire0") return;
		e.stat.projectile=ProjectileData.nameToData["Grenade"];
	}
	protected override void Weapon_AmmoConsumptionDeciding(object sender,ShootEventArgs e) {
		base.Weapon_AmmoConsumptionDeciding(sender,e);
		if(e.stat.shotTag!="altFire0") return;
		e.stat.ammoConsumption.baseValue=3;
		e.stat.recoil.baseValue=2;
		e.stat.cooldownTime.baseValue=0;
		e.stat.projectileCount.baseValue=1;
	}

}